#ifndef STREAM_H
#define STREAM_H

#include "HuntEngineSystem.h"
#include "ObjectSystemHeader.h"

class Stream
{
public:
	Stream();
	~Stream();

	// The objects to process, each object representing an entry 
	// into a connected component of the abstract graph
	bool Insert ( Object* pObject );
	bool Remove ( Object* pObject );
	void RemoveAll ();
	int GetObjectCount ();
	Object* GetObjectAt ( int i ) const;
	bool IsTopLevel ( Object* pObject );

	// Memory loads and saves. stream does not assume
	// responsibility for the char arrays. the application must
	// manage the inpuct acBuffer for the call to Load and delete
	// the output racBuffer for the call to Save.
	bool Load ( char* acBuffer, int iSize );
	bool Save ( char*& racBuffer, int& riSize );

	// file loads and saves
	bool Load ( const char* acFileName );
	bool Save ( const char* acFileName );

	// support for memory and disk usage
	int GetMemoryUsed () const;
	int GetDiskUsed () const;
};

#endif